﻿Imports System.Text.RegularExpressions

Public Class FuncionesGlobales

    'Reemplaza caracteres inválidos dentro de la cadena de texto
    Public Shared Function ValidarTexto(ByVal pTexto As String) As String
        Dim mRetorno As String = String.Empty
        Try
            Dim mRegex As Regex = New Regex("[^0-9a-zA-Z_áéíóúÁÉÍÓÚÑñ@%#|=""\-/[].:;\*\$\s]")
            mRetorno = mRegex.Replace(pTexto, "")

        Catch ex As Exception
            Throw ex

        End Try
        Return mRetorno
    End Function

    'Verifica si está correctamente logueado al Fwrk SPNF
    Public Shared Function LogueadoAlFwrk() As Boolean
        If Common.Env.Operador <> String.Empty Then
            Return True
        Else
            Return False
        End If
    End Function

End Class
